<?php

declare(strict_types=1);

namespace App\Amqp\Consumer;

use App\Service\Client\TaskEmployerService;
use Hyperf\Amqp\Annotation\Consumer;
use Hyperf\Amqp\Message\ConsumerMessage;
use Hyperf\Di\Annotation\Inject;


/**
 * 任务自动打款
 * @Consumer(exchange="taskAutoPayment", routingKey="taskAutoPayment", queue="taskAutoPaymentConsumer", name ="TaskAutoPaymentConsumer", nums=1)
 */
class TaskAutoPaymentConsumer extends ConsumerMessage
{
    /**
     * @Inject()
     * @var TaskEmployerService
     */
    protected $taskEmployerService;

    public function consume($data): string
    {
        return $this->taskEmployerService->taskAutoPayment($data);
    }
}
